package com.qf.homework2.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;


    @AllArgsConstructor
    @NoArgsConstructor
    @Data
    public class User {
        public User(String name, String password, String sex, Date birthday, Date registtime, String auth, Integer status) {
            this.name = name;
            this.password = password;
            this.sex = sex;
            this.birthday = birthday;
            this.registtime = registtime;
            this.auth = auth;
            this.status = status;
        }
        private Integer id;

        private String name;

        private String password;

        private String sex;
        @DateTimeFormat(pattern = "yyyy-MM-dd")
        private Date birthday;

        private Date registtime;

        private String auth;

        private Integer status;

        @Override
        public String toString() {
            return id+","+name+","+password+","+sex+","+birthday+","+registtime+","+auth+","+status;
        }
}
